<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('quality_control_manages', function (Blueprint $table) {
            $table->id();
            $table->string('shop_name')->default('')->comment('店铺名称');
            $table->string('sub_account')->default('')->comment('子账号名');
            $table->string('check_source')->default('')->comment('抽查来源');
            $table->tinyInteger('check_status')->default(2)->comment('1异常2无异常');
            $table->string('descript')->default('')->comment('异常描述');
            $table->text('follow_up')->default('')->comment('跟进内容');
            $table->text('review')->default('')->comment('复查描述');
            $table->tinyInteger('is_review')->default(1)->comment('1不需要复查2需要复查');
            $table->string('a_customer_couplet')->default('')->comment('A客户联');
            $table->string('b_service_couplet')->default('')->comment('B服务联');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `quality_control_manages` comment '品控管理'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('quality_control_manages');
    }
};
